package com.jason.www.widget.dialogfragment;

/**
 * @author：Jason
 * @date：2020/12/16 17:46
 * @email：1129847330@qq.com
 * @description:
 */
public class DialogData {
    private String mTitle;
    private String mMessage;
    private String mPositiveButtonText;
    private String mNegativeButtonText;
    private int mPositiveButtonTextColor;
    private int mNegativeButtonTextColor;
    private boolean mIsNegativeButtonGone;
    private boolean mIsPositiveButtonGone;
    private boolean mIsCancelable = true;
    private String mTag;
    private AlertDialogFragment.OnPositiveButtonClickListener onPositiveButtonClickListener;
    private AlertDialogFragment.OnNegativeButtonClickListener onNegativeButtonClickListener;

    public DialogData setOnPositiveButtonClickListener(AlertDialogFragment.OnPositiveButtonClickListener onPositiveButtonClickListener) {
        this.onPositiveButtonClickListener = onPositiveButtonClickListener;
        return this;
    }

    public DialogData setOnNegativeButtonClickListener(AlertDialogFragment.OnNegativeButtonClickListener onNegativeButtonClickListener) {
        this.onNegativeButtonClickListener = onNegativeButtonClickListener;
        return this;
    }

    public int getPositiveButtonTextColor() {
        return mPositiveButtonTextColor;
    }

    public DialogData setPositiveButtonTextColor(int mPositiveButtonTextColor) {
        this.mPositiveButtonTextColor = mPositiveButtonTextColor;
        return this;
    }

    public int getNegativeButtonTextColor() {
        return mNegativeButtonTextColor;
    }

    public DialogData setNegativeButtonTextColor(int mNegativeButtonTextColor) {
        this.mNegativeButtonTextColor = mNegativeButtonTextColor;
        return this;
    }

    public AlertDialogFragment.OnPositiveButtonClickListener getOnPositiveButtonClickListener() {
        return onPositiveButtonClickListener;
    }

    public AlertDialogFragment.OnNegativeButtonClickListener getOnNegativeButtonClickListener() {
        return onNegativeButtonClickListener;
    }

    public String getTag() {
        return mTag;
    }

    public DialogData setTag(String mTag) {
        this.mTag = mTag;
        return this;
    }

    public DialogData hideNegativeButton() {
        mIsNegativeButtonGone = true;
        return this;
    }

    public DialogData hidePositiveButton() {
        mIsPositiveButtonGone = true;
        return this;
    }

    public DialogData setCancelable(boolean isCancelable) {
        mIsCancelable = isCancelable;
        return this;
    }

    public DialogData setTitle(String mTitle) {
        this.mTitle = mTitle;
        return this;
    }

    public DialogData setMessage(String mMessage) {
        this.mMessage = mMessage;
        return this;
    }

    public DialogData setPositiveButtonText(String mPositiveButtonText) {
        this.mPositiveButtonText = mPositiveButtonText;
        return this;
    }

    public DialogData setNegativeButtonText(String mNegativeButtonText) {
        this.mNegativeButtonText = mNegativeButtonText;
        return this;
    }

    public String getTitle() {
        return mTitle;
    }

    public String getMessage() {
        return mMessage;
    }

    public String getPositiveButtonText() {
        return mPositiveButtonText;
    }

    public String getNegativeButtonText() {
        return mNegativeButtonText;
    }

    public boolean isIsNegativeButtonGone() {
        return mIsNegativeButtonGone;
    }

    public boolean isIsPositiveButtonGone() {
        return mIsPositiveButtonGone;
    }

    public boolean isCancelable() {
        return mIsCancelable;
    }
}